package com.minshenglife.zanzan.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.minshenglife.zanzan.dao.WorkConComDao;
import com.minshenglife.zanzan.entity.WorkConCom;
import com.minshenglife.zanzan.result.WorkConComResult;
import com.minshenglife.zanzan.service.WorkConComService;


/**
 * 工作内容service
 * @author huodd
 *
 */
@Component
@Transactional
public class WorkConComServiceImpl implements WorkConComService {
	Logger log = LoggerFactory.getLogger(WorkConComServiceImpl.class);
	@Resource
	WorkConComDao workConComDao;

	@Override
	@Transactional(readOnly=true)
	public WorkConCom get(Long logId) {
		return workConComDao.get(logId);
	}

	@Override
	public void add(WorkConCom con) {
		workConComDao.add(con);
	}

	@Override
	public List<WorkConComResult> findWorkReviewListOfTop10(String workConId) {
		Map<String,Object> map=new HashMap<String,Object>();
		map.put("workConId", workConId);
		map.put("from", 0);
		map.put("to",10);
		List<WorkConComResult> rows =workConComDao.findWorkReviewList(map);
		return rows;
	}


}
